import request  from '@/utils/request';

import { BASE_URL } from '@/config/query';

export async function queryPage(params = { pageSize: 10, pageNum: 1 }) {
  return request(`${BASE_URL}/analyse_risk/page`, params)
}

export async function queryInfoById(id) {
  return request(`${BASE_URL}/analyse_risk/detail/${id}`)
}

export async function create(params) {
  return request(`${BASE_URL}/analyse_risk/create`, params)
}

export async function update(params) {
  return request(`${BASE_URL}/analyse_risk/modify`, params)
}


//隐患高发部位的数据
export async function queryRiskHotList(){
  return request(`${BASE_URL}/risk/high/top10`)
}

//隐患统计隐患数

export async function queryRiskStatistic(){
  return request(`${BASE_URL}/risk/statistic`)
}

//隐患趋势统计

export async function queryRiskTrend(params){
  return  request(`${BASE_URL}/risk/chart/list`,params)
}